package jsr166.contrib.uncontended;

/**
 * This exception is used to indicate unexpected concurrent access 
 * to something protected by an UncontendedLock.
 * @author pugh
 *
 */
public class UnexpectedConcurrentAccessException extends IllegalStateException {

    private static final long serialVersionUID = 1L;
    final String threadName;
    
    public UnexpectedConcurrentAccessException(String msg) {
        super(msg);
        threadName = null;
    }
    public UnexpectedConcurrentAccessException(String msg, Thread t) {
        super(msg + " : " + t.getName());
        threadName = t.getName();
    }

}
